﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Yitter.IdGenerator;

namespace RBAC_Model
{
    public class Role : BaseEntity // ✅ 继承BaseEntity
    {
        /// <summary>
        /// 角色名称
        /// </summary>
        [Required]
        [StringLength(50)]
        public string RoleName { get; set; }

        /// <summary>
        /// 角色描述
        /// </summary>
        [StringLength(200)]
        public string Description { get; set; }

        /// <summary>
        /// 角色构造函数
        /// </summary>
        //public Role()
        //{
        //    Id = YitIdHelper.NextId(); // ✅ 在构造函数中生成ID
        //    CreateTime = DateTime.Now;
        //    UpdateTime = DateTime.Now;
        //}
    }
}
